import { Table } from 'antd';
import PropTypes from 'prop-types';
import React from 'react';
import styles from './List.less';

const List = ({ columns, data, ...rest }) => (
    <Table
        className={styles.box}
        columns={columns}
        pagination={false}
        dataSource={data}
        {...rest}
    />
);

List.propTypes = {
    data: PropTypes.array,
    columns: PropTypes.array
};

List.defaultProps = {
    data: [],
    columns: []
};

export default List;
